alert("Please open the memmon with the title Memmon. Like this: From the message window, type - Open window " & QUOTE & "memmon" & QUOTE & ". Open the main movie script for help. Thank you, the management.")
end if
end
on initGlobals
global gBar, gOtherBar, gStartCast, gEndCast, gStartFrame, gEndFrame, gLevel, gTemp, gTempo
set gBar to 10
set gOtherBar to 26
set gStartCast to the value of field "CastStart"
set gEndCast to the value of field "CastEnd"
set gStartFrame to the value of field "FrameStart"
set gEndFrame to the value of field "FrameEnd"
set gTemp to 0
set gTempo to 5
set gLevel to 2
end
on InitConditions
set the floatPrecision to 3
end
on initpuppets
global gBar
puppetSprite(gBar, 1)
puppetSprite(gOtherBar, 1)
puppetSprite(29, 1)
puppetSprite(30, 1)
puppetSprite(31, 1)
puppetSprite(32, 1)
puppetSprite(33, 1)
puppetSprite(34, 1)
end
on DoMe
global gLevel
UpdateGraph()
if gLevel > 1 then
UpdateFields()
end if
end
on UpdateGraph
global gBar, gOtherBar
if voidp(gBar) then
startMovie()
end if
set the height of sprite gBar to (the height of cast "border" * (the freeBytes * 1.0) / the memorysize) + 1.0
set the height of sprite gOtherBar to (the height of cast "border" * (the freeBlock * 1.0) / the memorysize) + 1.0
end
on UpdateFields
put the memorysize & " = " & the memorysize / 1024 & "k" into field "memsize"
put the freeBytes & " = " & the freeBytes / 1024 & "k" into field "freebytes"
put the freeBlock & " = " & the freeBlock / 1024 & "k" into field "freeblock"
put the memorysize - the freeBytes & " = " & (the memorysize - the freeBytes) / 1024 & "k" into field "MemUsed"
end
on GetValues
global gStartCast, gEndCast, gStartFrame, gEndFrame, gTemp
set gStartCast to the value of field "CastStart"
set gEndCast to the value of field "CastEnd"
set gStartFrame to the value of field "FrameStart"
set gEndFrame to the value of field "FrameEnd"
tell the stage
set gTemp to the number of castMembers
end tell
if gEndCast > gTemp then
set gEndCast to gTemp
end if
end
on startTimer
return the ticks
end
on PutTime now
set delta to the ticks - now
put "ticks = " & delta into field "delta t"
put RETURN & "secs = " & delta / 60.0 after field "delta t"
end
on InitTime
global gNow
set gNow to the ticks
end
on CheckTime
global gNow
put the ticks - gNow
end
on DoRight
set the castNum of sprite the clickOn to the number of cast "Left"
set wind to window "memmon"
set leftSide to getAt(the rect of wind, 1)
set topSide to getAt(the rect of wind, 2)
set rightSide to getAt(the rect of wind, 3)
set bottomSide to getAt(the rect of wind, 4)
set the rect of wind to rect(leftSide, topSide, rightSide + 128, bottomSide)
end
on DoLeft
set the castNum of sprite the clickOn to the number of cast "Right"
set wind to window "memmon"
set leftSide to getAt(the rect of wind, 1)
set topSide to getAt(the rect of wind, 2)
set rightSide to getAt(the rect of wind, 3)
set bottomSide to getAt(the rect of wind, 4)
set the rect of wind to rect(leftSide, topSide, rightSide - 128, bottomSide)
end
on DoUp arrow
if voidp(arrow) then
set the castNum of sprite the clickOn to the number of cast "down"
else
set the castNum of sprite 29 to 0
updateStage()
end if
set wind to window "memmon"
set leftSide to getAt(the rect of wind, 1)
set topSide to getAt(the rect of wind, 2)
set rightSide to getAt(the rect of wind, 3)
set bottomSide to getAt(the rect of wind, 4)
set the rect of wind to rect(leftSide, topSide, rightSide, bottomSide - 86)
end
on DoDown arrow
if voidp(arrow) then
set the castNum of sprite the clickOn to the number of cast "up"
else
set the castNum of sprite 29 to the number of cast "up"
end if
set wind to window "memmon"
set leftSide to getAt(the rect of wind, 1)
set topSide to getAt(the rect of wind, 2)
set rightSide to getAt(the rect of wind, 3)
set bottomSide to getAt(the rect of wind, 4)
set the rect of wind to rect(leftSide, topSide, rightSide, bottomSide + 86)
end
on GetMainMovieName
global gMovie
tell the stage
set gMovie to the movieName
end tell
put gMovie into field "Moviename"
end
on ResetTabButtons
set the backColor of sprite 31 to 250
set the backColor of sprite 32 to 245
set the backColor of sprite 33 to 245
set the backColor of sprite 34 to 245
end
on TurnOffDepthPuppets
repeat with temp = 13 to 17
puppetSprite(temp, 0)
end repeat
end
on TurnOffVolumePuppets
repeat with temp = 35 to 40
puppetSprite(temp, 0)
puppetSprite(temp, 0)
end repeat
end
on UpdateMeters
set mainVolHeight to 64 - (9 * the soundLevel)
set the height of sprite 35 to mainVolHeight
set the locV of sprite 38 to 69 + mainVolHeight - 3
set mainVolHeight to 64 - (0.25099999999999995 * the volume of sound 1)
set the height of sprite 36 to mainVolHeight
set the locV of sprite 39 to 69 + mainVolHeight - 3
set mainVolHeight to 64 - (0.25099999999999995 * the volume of sound 2)
set the height of sprite 37 to mainVolHeight
set the locV of sprite 40 to 69 + mainVolHeight - 3
end
on Memmon
go(1)
set the rect of window "memmon" to the sourceRect of window "memmon"
open(window "memmon")
end
on InitTempoIndicator
global gTempo
puppetSprite(22, 0)
puppetSprite(22, 1)
set the locV of sprite 22 to the bottom of sprite 21 - (gTempo * 3) - 1